package com.shawn;

import java.util.Arrays;
import java.util.Scanner;

/**
 * Created by feiyu on 17-6-2.
 */
public class Mains {
    public static void main(String[] args){
        int n=10;
        int[] arr=new int[3*n];
        for(int i=0;i<arr.length;i++){
            arr[i]=1000000000;
        }
        Arrays.sort(arr);
        for (int tmp :
                arr) {
            System.out.println(tmp);
        }
        long sum=0;
        for(int i=n;i<3*n;i+=2){
            sum+=arr[i];

        }
        System.out.println(sum);
    }
}
